xi2: Improve pointer emulation debug reporting
authorDavid King <amigadave@amigadave.com>
Thu, 11 Apr 2013 13:29:11 +0000 (14:29 +0100)
committerDavid King <amigadave@amigadave.com>
Thu, 11 Apr 2013 14:56:13 +0000 (15:56 +0100)
Reporting "true" or "false" is nicer than the value of the flag.

https://bugzilla.gnome.org/show_bug.cgi?id=697795

gdk/x11/gdkdevicemanager-xi2.c

index db2ba2833c454b50423ccacada2b5fc4c408f6f1..751343a122a35465928ce09abf8333c3c523e3f6 100644 (file)
@@ -1408,11 +1408,11 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
         GdkDevice *source_device;
 
         GDK_NOTE(EVENTS,
-                 g_message ("touch %s:\twindow %ld\n\ttouch id: %u\n\tpointer emulating: %d",
+                 g_message ("touch %s:\twindow %ld\n\ttouch id: %u\n\tpointer emulating: %s",
                             ev->evtype == XI_TouchBegin ? "begin" : "end",
                             xev->event,
                             xev->detail,
-                            xev->flags & XITouchEmulatingPointer));
+                            xev->flags & XITouchEmulatingPointer ? "true" : "false"));
 
         if (ev->evtype == XI_TouchBegin)
           event->touch.type = GDK_TOUCH_BEGIN;
@@ -1481,10 +1481,10 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
         GdkDevice *source_device;
 
         GDK_NOTE(EVENTS,
-                 g_message ("touch update:\twindow %ld\n\ttouch id: %u\n\tpointer emulating: %d",
+                 g_message ("touch update:\twindow %ld\n\ttouch id: %u\n\tpointer emulating: %s",
                             xev->event,
                             xev->detail,
-                            xev->flags & XITouchEmulatingPointer));
+                            xev->flags & XITouchEmulatingPointer ? "true" : "false"));
 
         event->touch.window = window;
         event->touch.sequence = GUINT_TO_POINTER (xev->detail);